package com.myapp.ruyixing.http;

import org.json.JSONObject;

import com.myapp.ruyixing.model.OrderInfo;

public class OrderInfoParser extends RYJSONParser {
	@Override
	public Object parse(JSONObject jsonObject) {

		OrderInfo orderInfo = new OrderInfo();

		ModelParser.parseModel(orderInfo, jsonObject);

		JSONObject data = jsonObject.optJSONObject("data");
		orderInfo.awardpoint = data.optString("awardpoint", "");
		orderInfo.content = data.optString("content", "");
		orderInfo.datetime = data.optString("datetime", "");
		orderInfo.name = data.optString("name", "");
		orderInfo.orderid = data.optString("orderid", "");
		orderInfo.persons = data.optString("persons", "");
		orderInfo.phone = data.optString("phone", "");
		orderInfo.price = data.optString("price", "");
		orderInfo.remark = data.optString("remark", "");
		orderInfo.reversetime = data.optString("reversetime", "");
		orderInfo.sex = data.optString("sex", "");
		orderInfo.status = data.optString("status", "");
		orderInfo.type = data.optString("type", "");

		return orderInfo;

	}
}
